This invention relates to a method and apparatus for a production rule engine. In particular this relates to a method and apparatus for extending a production rule engine with ontological reasoning.
A production rule is a rule with a condition part and an action part. The condition part is there to constantly match the instances grouped in working memory. The action part is there to react on the matched instances and to update the available instances. Production rules are written according to the descriptions of the instances they are going to process. They are expected to change the instances but not the descriptions.
Ontologies are providing both descriptions and instances. Ontology Web Language2 (OWL2) is a standard ontology for a new candidate state of practice.
In an object model, descriptions are classes with typed attributes organized as class hierarchies. Classes are there to classify the instances. An instance is an object with an internal structure that depends on its class. The production rules in this case are directly matching objects in the condition part. And they are directly updating objects in the action part.
In a standard OWL2 ontology, descriptions are logical descriptions. A class is a predicate of arity one. A class assertion is a classification fact about an individual. Individuals may belong to many classes. In OWL2 properties are not part of the class definitions. Here, a property is a predicate of arity two. A property assertion is a relational fact involving a subject, an individual, and an object, a constant. By default many subjects can be connected to many objects. Thus properties are really relations by default which is not the case in an object model. A constant is either an individual or either a data value. An individual is not comparable to an object of an object model. It does not have dedicated internal slots to store the values of its attributes. Besides being a “thing”, an individual does not have a particular instantiation type as it is the case for the objects in an object model. An individual is just becoming a member of some classes according to the classification assertions. When trying to map objects to individuals, the internal structure of the objects needs to be exposed as facts using only properties and classes involving individuals and data values. An object model is only a very particular case of an OWL2 ontology. The production rules coupled to an OWL2 ontology are matching facts, knowledge about constants, in the condition part. And they are updating facts in the action part.
As already mentioned, standard OWL2 ontological descriptions are more sophisticated than the class hierarchies of an object model. Operators are available to recursively combine class and property expressions. But the most important OWL2 constructs are the axioms that tell how to reason on the class and the property expressions.